package com.example.custommultipleprogress;

import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import com.example.custommultipleprogress.ui.activity.CustomProgressActivity;
import com.example.custommultipleprogress.ui.activity.VehicleSpeedActivity;
import com.example.custommultipleprogress.ui.activity.WaterTemp01Activity;
import com.example.custommultipleprogress.ui.activity.WaterTemp02Activity;
import com.example.custommultipleprogress.ui.activity.WaterTemp03Activity;

public class MainActivity extends AppCompatActivity implements View.OnClickListener {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        Button mBtnVehicleSpeed = findViewById(R.id.btn_vehicle_speed);
        mBtnVehicleSpeed.setOnClickListener(this);
        Button mBtnWaterTemp01 = findViewById(R.id.btn_water_temp_01);
        mBtnWaterTemp01.setOnClickListener(this);
        Button mBtnWaterTemp02 = findViewById(R.id.btn_water_temp_02);
        mBtnWaterTemp02.setOnClickListener(this);
        Button mBtnOilQuantity = findViewById(R.id.btn_oil_quantity);
        mBtnOilQuantity.setOnClickListener(this);
        Button mBtnProgress = findViewById(R.id.btn_progress);
        mBtnProgress.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {

        switch (v.getId()) {
            case R.id.btn_vehicle_speed:
                startActivity(new Intent(this, VehicleSpeedActivity.class));
                break;
            case R.id.btn_water_temp_01:
                startActivity(new Intent(this, WaterTemp01Activity.class));
                break;
            case R.id.btn_water_temp_02:
                startActivity(new Intent(this, WaterTemp02Activity.class));
                break;
            case R.id.btn_oil_quantity:
                startActivity(new Intent(this, WaterTemp03Activity.class));
                break;
            case R.id.btn_progress:
                startActivity(new Intent(this, CustomProgressActivity.class));
                break;
        }

    }
}
